package com.morizhang.merchanmanager.api.model;

import lombok.Data;

@Data
public class CommodityLocationModel implements Cloneable {
    private String serialNo;
    private String barCode;
    private String batchNo;
    private int amountNow;
    private String warehouseShelfNo;
    private String shopShelfNo;

    private String sourceWarehouseShelfNo;
    private String destinationWarehouseShelfNo;
    private String sourceShopShelfNo;
    private String destinationShopShelfNo;
    private int moveAmount;

    public CommodityLocationModel() {
        super();
    }

    @Override
    public Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }

    public CommodityLocationModel(StockModel stockModel) {
        this.barCode = stockModel.getBarCode();
        this.batchNo = stockModel.getBatchNo();
        this.amountNow = stockModel.getAmountNow();
    }

    public CommodityLocationModel(SaleModel saleModel) {
        this.barCode = saleModel.getBarCode();
    }
}
